﻿using Architecture.Domain.TraceabilityManage;
using Architecture.Domian;
using Architecture.Domian.Entity;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Architecture.Repository
{
    public class EFCoreDbContext : DbContext
    {
        public EFCoreDbContext(DbContextOptions<EFCoreDbContext> options) : base(options)
        {

        }

        #region RBAC
        // 用户
        public virtual DbSet<UserInfo> UserInfos { get; set; }

        // 角色
        public virtual DbSet<RoleInfo> RoleInfos { get; set; }
        public virtual DbSet<UserRoleRelation> UserRoleRelations { get; set; }
        // 权限
        public virtual DbSet<MenuInfo> MenuInfos { get; set; }
        public virtual DbSet<RoleMenuRelation> PressionInfos { get; set; }
        #endregion

        #region 溯源管理
        //溯源
        public virtual DbSet<SourceInfo> SourceInfos { get; set; }
        public virtual DbSet<GoodsInfo> GoodsInfos { get; set; }

        //养殖
        public virtual DbSet<Culture> Culture { get; set; }
        public virtual DbSet<ImmuneInFormation> ImmuneInFormation { get; set; }

        //公司
        public virtual DbSet<Corporation> Corporation { get; set; }

        //屠宰
        public virtual DbSet<Slaughter> Slaughter { get; set; }

        //深加工
        public virtual DbSet<DeepProcessing> DeepProcessing { get; set; }

        public virtual DbSet<Supplier> Supplier { get; set; }
        #endregion

    }
}
